package cn.myzqu.sign.user.server.dto;

import lombok.Data;

/**
 * @author chenyihui
 * @Description: TODO
 * @date 2019/1/26  12:14
 */
@Data
public class QueryObject {
    private Integer limit=10; // 页大小
    private Integer page=1; // 页码
    private String order="desc"; // 排序，desc|asc
    private String sort; // 排序字段
    private String search; // 搜索关键字
    private Integer offset= (page - 1) * limit;//偏移量



    public QueryObject() {

    }

    public QueryObject(Integer limit, Integer page, String order, String sort, String search) {
        super();
        this.limit = limit;
        this.page = page;
        this.order = order;
        this.sort = sort;
        this.search = search;
        this.offset=(page - 1) * limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getSearch() {
        return search;
    }

    public void setSearch(String search) {
        this.search = search;
    }
    public Integer getOffset() {
        return offset;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }
}
